package src 
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	/**
	 * ...
	 * @author Felipe Soares Pinhel
	 */
	public class Menu extends Sprite
	{
		public var options : Option;
		
		public function Menu() 
		{
			init();
		}
		
		private function init() : void
		{
			MediaPlayer.menu();
			
			_btnOptions.addEventListener(MouseEvent.CLICK, clickOptions, false, 0, true);	
		}
		
		private function clickOptions( e : MouseEvent) : void
		{
			options = new Option();
			this.addChild(options);
			options._btnBack.addEventListener(MouseEvent.CLICK, backToMenu, false, 0, true);
			
		}
		
		function backToMenu( e : MouseEvent ) : void
		{
			options._btnBack.removeEventListener(MouseEvent.CLICK, backToMenu);
			this.removeChild(options);
			options = null;
			
			
		}
		
	}

}